namespace Cos.Core.NHibernate
{
    #region Usings

    using System;

    #endregion

    public class DATABASECHANGELOGDataModel
    {
        #region Constructors and Destructors

        public DATABASECHANGELOGDataModel() {}

        #endregion

        #region Properties

        public virtual string AUTHOR { get; set; }

        public virtual string COMMENTS { get; set; }

        public virtual DateTime DATEEXECUTED { get; set; }

        public virtual string DESCRIPTION { get; set; }

        public virtual string FILENAME { get; set; }

        public virtual string ID { get; set; }

        public virtual string LIQUIBASE { get; set; }

        public virtual string MD5SUM { get; set; }

        public virtual string TAG { get; set; }

        #endregion

        #region Object Overrides

        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return false;
            }

            var model = obj as DATABASECHANGELOGDataModel;

            return model != null && this.ID == model.ID && this.AUTHOR == model.AUTHOR &&
                   this.FILENAME == model.FILENAME;
        }

        public override int GetHashCode()
        {
            return this.ID.GetHashCode() 
                ^ this.AUTHOR.GetHashCode()
                ^ this.FILENAME.GetHashCode();
        }

        #endregion
    }
}